import java.util.Scanner;

public class bbb {
    public static void reverse(int number)
    {
        System.out.print(number%10);
        if(number>9)
            reverse(number/10);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        reverse(n);
    }
}
